home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / M / May MacUser Program.cpt / miniGenApp Hdr / AppGlobals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-29  |  2.1 KB  |  72 lines  |  [TEXT/KAHL]

  1. /* *****************************************************************************
  2.     FILE:             AppGlobals.h
  3.     
  4.     DESCRIPTION:     Application global variables declaration and definitions
  5.  
  6.     AUTHOR:            Kurt W.G. Matthies
  7.         
  8.     Copyright © 1990 by Code of the West, Inc., All Rights Reserved.
  9.  
  10.     Revision History:
  11.     ==========================================================
  12.     3.30.90    -    May 1990 MacUser Release
  13.     ==========================================================
  14.  
  15.    ***************************************************************************** */
  16. #ifndef _AppGlobals_
  17. #define    _AppGlobals_
  18.  
  19.  
  20. #ifdef _Main_Module_
  21. #define SCOPE /*GLOBAL*/
  22. #else
  23. #define SCOPE extern
  24. #endif
  25.  
  26. /* 
  27.     There's a trick in these definitions:
  28.     
  29.     if _Main_Module_ is defined, and it's only defined in Shell.c,
  30.     then SCOPE is a comment and the variables are defined, the space for
  31.     them created.
  32.     
  33.     if _Main_Module_ is undefined, as in all other modules but Shell.c
  34.     then SCOPE becomes the keyword 'extern' and these variables are declared,
  35.     so they're accessable, but no space is created for them.
  36.     
  37.     Thus, you can use this file in any file that needs to access 
  38.     the application's globals. Then, there's no need to define globals 
  39.     extern in a module before they can be used--it's already done for you.
  40.  
  41. */
  42.     
  43. #include "AppConstants.h"
  44. #include "AppTypes.h"
  45.  
  46. #include <MenuMgr.h>
  47.  
  48. #include "Version.h"    /* sets up the compiler version flag - see the readme file */
  49.  
  50. #ifdef V2
  51. #include <OSUtil.h>
  52. #endif
  53.  
  54.  
  55. SCOPE         MenuHandle             gDeskMenu,            /* menu handles */
  56.                                 gFileMenu,
  57.                                 gEditMenu;
  58.  
  59. SCOPE        SysEnvRec            gSysEnv;            /* the current HW environment */
  60. SCOPE        Boolean                gHasWNE,            /* has Wait Next Event implemented */
  61.                                 gHasColor,            /* has color toolbox */
  62.                                 gDevel;                /* in development */
  63.                                 
  64. SCOPE        Rect                gScreenRect,        /* the main device screen rect */
  65.                                 gWindowRect;        /* default window rect */
  66.  
  67. #undef _main_module
  68.  
  69. #endif
  70. /* ==================================  EOF  ====================================
  71.          Copryright © 1990 Code of the West, Inc.  All Rights Reserved
  72.    ============================================================================= */